package com.meshnetics.gb.stack.core.apl.type;

import com.meshnetics.gb.type.impl.zcl.FixedBytesDataType;
import com.meshnetics.gb.type.impl.zcl.FixedBytesDataValue;

/**
 * Type for EndPointAddress.
 *
 * @author mmarkov
 */
public class TypeEndPointAddress extends FixedBytesDataType {
    /** The only instance of this type. */
    public static final TypeEndPointAddress TYPE = new TypeEndPointAddress();

    /**
     * Contructs TypeEndPointAddress with the pre-defined name ('endpointAddress').
     */
    private TypeEndPointAddress() {
        super(new String[] { "endpointAddress" }, 1);
    }

    /**
     * Creates EndPointAddress from array of bytes.
     *
     * @param bytes array of bytes
     * @return constructed EndPointAddress
     */
    protected FixedBytesDataValue createValue(byte[] bytes) {
        return new EndPointAddress(this, bytes);
    }
}


